<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      * {
        padding: 0;
        margin: 0;
        font-size: 100%;
        font-weight: normal;
      }
      ul {
        list-style: none;
      }
      .desc {
        color: #666;
        font-size: 14px;
        text-align: center;
        margin: 1em 0;
      }
      .menu-container {
        width: 200px;
        margin: 50px auto;
        background: #434a50;
        color: #fff;
        line-height: 1.5;
      }
      .menu h2 {
        padding: 10px 20px;
        cursor: pointer;
      }
      .sub-menu {
        background: #565c63;
      }
      .sub-menu li {
        font-size: 14px;
        padding: 8px 0 8px 30px;
      }
    </style>
    <style>
      /* 在这里完成作业 */
    </style>
  </head>
  <body>
    <p class="desc">本效果需要用到JS</p>
    <p class="desc">为降低复杂度，子菜单高度固定为150px</p>
    <p class="desc">
      因为如果高度为auto，无法产生过渡效果，必须通过一些特别的技巧才能解决
    </p>
    <div class="menu-container">
      <div class="menu">
        <h2>菜单1</h2>
        <ul class="sub-menu">
          <li>菜单1-1</li>
          <li>菜单2-2</li>
          <li>菜单3-3</li>
          <li>菜单4-4</li>
        </ul>
      </div>
      <div class="menu">
        <h2>菜单2</h2>
        <ul class="sub-menu">
          <li>菜单2-1</li>
          <li>菜单2-2</li>
          <li>菜单2-3</li>
          <li>菜单2-4</li>
        </ul>
      </div>
      <div class="menu">
        <h2>菜单3</h2>
        <ul class="sub-menu">
          <li>菜单3-1</li>
          <li>菜单3-2</li>
          <li>菜单3-3</li>
          <li>菜单3-4</li>
        </ul>
      </div>
      <div class="menu">
        <h2>菜单4</h2>
        <ul class="sub-menu">
          <li>菜单4-1</li>
          <li>菜单4-2</li>
          <li>菜单4-3</li>
          <li>菜单4-4</li>
        </ul>
      </div>
    </div>
  </body>
</html>

